home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / MacCjr / MacC Jr / Library Folder / C Include Folder / Font.h < prev    next >
Encoding:
Text File  |  1987-01-06  |  2.4 KB  |  137 lines  |  [TEXT/EDIT]

  1. // Font.h
  2. // © Copyright 1984 Consulair Corp, All Rights Reserved.
  3. // Portions © Copyright Apple Computer, Inc: 1982, 1983, 1984
  4. //            Stanford University, SUMEX project: 1984
  5. // Requires Macdefs.h Quickdraw.h
  6.  
  7. #ifndef FontLoaded
  8.  
  9.   #ifndef QuickdrawLoaded
  10.     #include "quickdraw.h"
  11.     #endif
  12.   
  13.   #define FontLoaded
  14.  
  15. // Definitions
  16.   
  17.   #define    systemFont    0
  18.   #define    applFont    1
  19.   #define    newYork        2
  20.   #define    geneva        3
  21.   #define    monaco        4
  22.   #define    venice        5
  23.   #define    london        6
  24.   #define    athens        7
  25.   #define    sanFran        8
  26.   #define    toronto        9
  27.  
  28.  /* add constants for new fonts */
  29.  
  30.   #define       cairo        11
  31.   #define       losAngeles    12
  32.   #define       times        20
  33.   #define       helvetica    21
  34.   #define       courier        22
  35.   #define       symbol        23
  36.   #define       taliesin    24
  37.   #define       kanji        25
  38.   
  39.   #define    propFont    0x9000
  40.   #define    fixedFont    0xB000
  41.   #define    fontWid        0xACB0
  42.   
  43.   #define       normalStyle    0
  44.   #define    boldStyle    1
  45.   #define    italicStyle    2
  46.   #define    underlineStyle    4
  47.   #define    outlineStyle    8
  48.   #define    shadowStyle    16
  49.   #define    condenseStyle    32
  50.   #define    extendStyle    64
  51.   
  52. // Types and structures
  53.   
  54.   // typedef    short    Style; in Quickdraw.h
  55.   
  56.   typedef struct
  57.     {
  58.     short    ascent;
  59.     short    descent;
  60.     short    widMax;
  61.     short    leading;
  62.     } FontInfo;
  63.   
  64.   
  65.   /* STRUCTURE DEFINED IN QUICKDRAW.H
  66.     
  67.     typedef struct
  68.       {
  69.       short    errNum;
  70.       Handle    fontHandle;
  71.       char    bold;
  72.       char    italic;
  73.       char    ulOffset;
  74.       char    ulShadow;
  75.       char    ulThick;
  76.       char    shadow;
  77.       char    extra;
  78.       char    ascent;
  79.       char    descent;
  80.       char    widMax;
  81.       char    leading;
  82.       char    unused;
  83.       Point    numer;
  84.       Point    denom;
  85.       } FMOutRec;
  86.   
  87.     typedef FMOutRec * FMOutPtr;
  88.     */
  89.   
  90.    struct __FI
  91.     {
  92.     short    family;
  93.     short    size;
  94.     char    face;
  95.     char    needBits;
  96.     short    device;
  97.     Point    numer;
  98.     Point    denom;
  99.     };
  100.   
  101.   #define FMInput struct __FI;
  102.   
  103.   typedef struct __FR
  104.     {
  105.     short    fontType;
  106.     short    firstChar;
  107.     short    lastChar;
  108.     short    widMax;
  109.     short    kernMax;
  110.     short    nDescent;
  111.     short    fRectMax;
  112.     short    chHeight;
  113.     short    owTLoc;
  114.     short    ascent;
  115.     short    descent;
  116.     short    leading;
  117.     short    rowWords;
  118.     /*
  119.       short    bitImage[rowWords,chHeight];
  120.       short    locTable[];
  121.       short    owTable[];
  122.       */
  123.     };
  124.   
  125.   #define FontRec struct __FR;
  126.   
  127. /* Functions returning other then integer */
  128.   
  129.   #define SwapFont (FMOutPtr)SwapFont
  130.  
  131. #endif
  132.  
  133.   
  134.  
  135.  
  136.  
  137.